<template>
  <div>
    <div>{{ content }}</div>
    <button @click="refresh">
      Refresh
    </button>
  </div>
</template>

<script>
export default {
  asyncData () {
    // eslint-disable-next-line no-console
    console.log('Created at: ' + new Date())
    return { content: 'Created at: ' + new Date() }
  },
  methods: {
    // 运行会重新输出当前时间
    refresh () {
      this.$nuxt.refresh()
    }
  }
}
</script>
